package org.example.dto;

import lombok.Data;
import org.bson.types.ObjectId;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;

@Data
@Document("pig") //指定mongodb中的集合名字
public class Pig {

    @Id//指定主键
    private ObjectId id;
    private String name;
    private String master;
}
